﻿
@{
    ViewBag.Title = "OutpatientQuery";
    Layout = "~/Views/Shared/_Form.cshtml";
    var reportUrl = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportUrl");
    var reportSystemCode = Newtouch.Core.Common.Utils.ConfigurationHelper.GetAppConfigValue("ReportSystemCode");
}

<div class="rows">
    <div class="panel panel-default">
        <table class="form">
            <tr>
                <th class="formTitle">开始日期：</th>
                <td class="formValue">
                    <input id="ksrq" type="text" class="form-control input-wdatepicker formClearIgnore" style="width:90px"
                           onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
                           onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
                           value="@DateTime.Now.ToString("yyyy-MM-01")" />
                </td>
                <th class="formTitle">结束日期：</th>
                <td class="formValue">
                    <input id="jsrq" type="text" class="form-control input-wdatepicker formClearIgnore" style="width:90px"
                           onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
                           onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })"
                           value="@DateTime.Now.ToString("yyyy-MM-dd")" />
                </td>
                <th class="formTitle">费用性质：</th>
                <td class="formValue">
                    <select id="yblb" class="form-control">
                        <option value="自费">自费</option>
                        <option value="城保">城保</option>
                        <option value="居保">居保</option>
                        <option value="全部医保">全部医保</option>
                        <option value="全部">全部</option>
                    </select>
                </td>
                <th class="formTitle"></th>
                <td class="formValue" style="padding-left:20px;">
                    <input type="button" id="btn_search" onclick="submit();" class="btn btn-primary btn-md" value="查询" style="width:55px" />
                </td>
            </tr>
        </table>
    </div>
</div>


<div class="ui-layout" id="layout" style="height:100%;width:100%;">
    <iframe class="ui-layout-center" style="width:100%;" id="iframerightiframerightiframerightttt" name="iframerightiframerightiframerightttt"
            scrolling="auto" allowtransparency="true" frameborder="0"></iframe>
</div>




<script type="text/javascript">
    var isHospAdministrator = '@(ViewBag.IsHospAdministrator)';
    var curUserCode = '@(ViewBag.CurUserCode)';
    var OrgId = '@(ViewBag.OrgId)';
    var reportServerHOST = '@(ViewBag.ReportServerHOST)';
    //$("#sfdl").bindSelect({
    //    url: "/Report/GetSFDLCodeSelectJson",
    //    param: {},
    //    dataType: "json",
    //});
    function submit() {
        if ($('#ksrq').val().length == 0 || $('#jsrq').val().length == 0) {
            $.modalAlert("请选择时间范围", "error");
            return;
        }
        var url = getUrl();
        $("#iframerightiframerightiframerightttt").attr('src', url);
    }

    $("#iframerightiframerightiframerightttt").load(function () {
        $.loading(false);
    });

    $(function () {
        var h = $(window).height() - 55
        $('#layout iframe').css('height', h);

    });

    //刷新列表
    function refReport() {
        $("#btn_search").trigger('click');
    }

    function getUrl() {
        var srcUrl2 = '@Html.Raw(reportUrl)' + "?tempCode=1225" + "&hospitalCode=" + OrgId + "&kssj=" + $('#ksrq').val() + "&jssj=" + $('#jsrq').val() + "&yblb=" + $('#yblb').val() + "&systemCode=" + '@reportSystemCode';
        return srcUrl2;
    }

</script>
 